F# Implement list [] operator on a class?

Posted by akaphenom on Stack Overflow See other posts from Stack Overflow or by akaphenom
Published on 2010-04-22T01:10:40Z Indexed on 2010/04/22 1:13 UTC
Read the original article Hit count: 232

Filed under:
|

I have a custom class in F# and I want to implement the [] list operator such that

let myClass = new myClassObj()
let someVal  = myClass.[2]

I can't seem to find this on the web - I probably don't know the right term to search for... thanks in advance

© Stack Overflow or respective owner

Related posts about F#

Related posts about operator-overloading